score=float(input())
A=[]
B=[]
C=[]
D=[]
E=[]
while score>=0:
    if score>=90:
        A.append(score)
    elif 90>score>=80:
        B.append(score)
    elif 79>=score>=70:
        C.append(score)
    elif 69>=score>=60:
        D.append(score)
    elif score<60:
        E.append(score)
    score=float(input())
A.sort()
B.sort()
C.sort()
D.sort()
E.sort()
A.reverse()
B.reverse()
C.reverse()
E.reverse()
D.reverse()
print('A:',A)
print('B:',B)
print('C:',C)
print('D:',D)
print('F:',E)
